home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
shells
/
scsh-0.4
/
scsh-0
/
scsh-0.4.2
/
scsh
/
enumconst.scm
< prev
next >
Wrap
Text File
|
1995-10-13
|
511b
|
17 lines
;;; Copyright (c) 1994 by Olin Shivers.
;;; Handy for defining random flags and constants.
;;; (define-enum-constant "errno" intr 9) => (define errno/intr 9)
;;; Ugly, but it works.
;;; The question: is / the best separator? Alternates: $ . |
(define-syntax define-enum-constant
(lambda (form rename compare)
(let ((%define (rename 'define))
(var (string->symbol (string-append (cadr form) "/"
(symbol->string (caddr form)))))
(value (cadddr form)))
`(,%define ,var ,value))))